﻿using System;
using MongoDB.Attributes;

namespace CsharpTrainer.MongoDB.Model
{
    public class Person
    {
        [MongoId]
        public string ID { get; set; }
        public string Name { get; set; }
        public int Age { get; set; }
        public DateTime CreateTime { get; set; }

        public override string ToString()
        {
            string format = "ID: {0}\nName: {1}\n"
                          + "Age: {2}\nCreateTime: {3}\n";

            return string.Format(format, ID, Name, Age, CreateTime);
        }
    }
}


